package com.qmq.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
/**
 * @author modify
 */
@Configuration
public class SwaggerConfig {
    @Bean
    public Docket docket() {
        Docket docket = new Docket(DocumentationType.SWAGGER_2);
        ApiInfo apiInfo = new ApiInfoBuilder().contact(new Contact("qmq", "http://www.baidu.com", "2645922971@qq.com"))
                .title("modify-Api-uni-app后台系统")
                .description("modify-Api-Swagger-description")
                .version("1.0")
                .build();
        docket.apiInfo(apiInfo);
        return docket;
    }

    private ApiInfo apiInfo() {
        return new ApiInfoBuilder()
                .title("springcloudproducer_RESTful APIs")
                .description("服务名：springcloudproducer")
                .version("1.0")
                .build();
    }
}
